#!/sbin/openrc-run

# Set environment variables for locales.
# Taken from the default Guix OpenRC services provided by upstream.
export GUIX_LOCPATH=/var/guix/profiles/per-user/root/guix-profile/lib/locale
export LC_ALL=en_US.utf8

# Prefer guix-daemon installed in the root profile (if available).
command=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon
if [ ! -x "$command" ] || yesno "$PREFER_PACKAGED_DAEMON"; then
	command=/usr/bin/guix-daemon
fi

command_args="--build-users-group=guixbuild --discover=no"
supervisor=supervise-daemon
error_logger="logger -t '${RC_SVCNAME}' -p daemon.error"
#output_logger="logger -t '${RC_SVCNAME}' -p daemon.info"
